<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:replace="common/header::common_head"></head>
    <title>采购表单</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">

    <link rel="stylesheet" href="../../wechat/css/weui.min.css">
    <link rel="stylesheet" href="../../wechat/css/jquery-weui.css">
    <link rel="stylesheet" href="../../wechat/css/demos.css">
<body ontouchstart class="hold-transition skin-blue sidebar-mini">
<div th:replace="common/LeftCommon::common_top_left"></div>
<div class="content-wrapper">
<div class="weui-search-bar" id="searchBar" style="width: 100%">
    <form class="weui-search-bar__form" action="#">
        <div class="weui-search-bar__box">
            <i class="weui-icon-search"></i>
            <input type="search" class="weui-search-bar__input" id="searchInput" placeholder="搜索" required="">
            <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
        </div>
        <label class="weui-search-bar__label" id="searchText" style="transform-origin: 0px 0px 0px; opacity: 1; transform: scale(1, 1);">
            <i class="weui-icon-search"></i>
            <span>搜索</span>
        </label>
    </form>
    <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
</div>
<div class="weui-tab">
    <div class="weui-navbar">
        <a class="weui-navbar__item "  onclick="today()">
            今日
        </a>
        <a class="weui-navbar__item"   onclick="yesterday()">
            昨日
        </a>
        <a class="weui-navbar__item" onclick="seven()">
            近7天
        </a>
        <a class="weui-navbar__item"  onclick="thirty()">
            近30天
        </a>
    </div>
    <div class="weui-tab__bd">
        <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
            <div class="content-wrapper">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        采购表单
                        <small>PurchaseForm</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="/index"><i class="fa fa-dashboard"></i> 首页</a></li>
                        <li><a href="#">表单</a></li>
                        <li class="active">采购表单</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="nav-tabs-custom">
                                <div class="tab-content" style="height: 1000px">
                                    <!-- Font Awesome Icons -->
                                    <div style="margin-top: -65px">
                                        <div style="margin-top: 20px">
                                            <div class="data-container" style="float: left;width: 100px">
                                                <span class="title" style="font-size: 1.1em;">采购单品数</span>&nbsp;&nbsp;
                                                <span style="font-size: 2em;color: red;" th:text="${sum}"></span>
                                            </div>
                                            <div class="data-container" style="float: left;width: 95px">
                                                <span class="title" style="font-size: 1.1em;">采购笔数</span>&nbsp;&nbsp;
                                                <span style="font-size: 2em;color: red;">1</span>
                                            </div>
                                            <div class="data-container last-container" style="float: left;width: 95px">
                                                <span class="title" style="font-size: 1.1em;">采购金额</span>&nbsp;&nbsp;
                                                <span style="font-size: 2em;color: red;" th:text="￥+${amount}"></span>
                                            </div>
                                        </div>
                                        <section class="content" style="margin-top: 70px">
                                            <table style="float: left;overflow: auto; width: 2000px;margin-top: 20px "data-show-columns="true">
                                                <tbody>
                                                <tr th:each="goods, goodsStat: ${goods}">
                                                    <td>
                                                        <div class=" box-widget" style="margin-top: 25px" >
                                                            <div class="box-header with-border">
                                                                <div class="user-block">
                                                                    <div class="product-img">
                                                                        <img src="../../dist/img/user1-128x128.jpg" alt="User Image">
                                                                    </div>
                                                                    <span class="username">
                                                                        <a href="javascript:void(0)" class="product-title">
                                                                            <p th:text="${goods.name}" style=" margin-top:2px;font-size:4.375vw;float: left"></p>
                                                                        </a>
                                                                        <p style="margin-top: 5px;float: left;" th:text="'(' + ${goods.goodsNumber} + ')'"></p>
                                                                    </span>
                                                                    <span class="description">
                                                                        <p style="position: absolute;margin-top: 30px;" th:text="${goods.size} +' ' + '-' +' '+ ${goods.color}"></p>
                                                                        <p style="color: red;position: absolute;margin-top: 30px;margin-left: 10%;font-size: 1.2em" th:text="'￥' + ${goods.unitPrice}"></p>
                                                                    </span>
                                                                        </div>
                                                                    </div>
                                                                    <div class="box-body" style="padding: 0px">
                                                                        <span>
                                                                            <p style="float: left">单价数量：</p><p style="float: left" th:text="'￥'+${goods.unitPrice} + '*'"></p><p style="float: left;color: red" th:text="${goods.unitNumber}"></p>件
                                                                        <br/>
                                                                            <p style="float: left; position: absolute;left: 0px;">业务时间：</p><p style="float: left;position: absolute;left: 85px" th:text="${#dates.format(goods.createTime, 'yyyy-MM-dd  HH:mm:ss')}"></p>
                                                                        </span>
                                                                        <div style="position: relative;margin-top:25px">
                                                                            <p style="float: left;">单据编号：</p><p style="float: left;" th:text="${goods.billNumber}"></p>
                                                                            <p style="margin-top: 25px;margin-left: -145px;float: left">供应商：</p><p style="margin-top: 25px;margin-left: -80px;float: left" th:text="${goods.supplier}"></p>
                                                                            <p style="float: left;margin-left: -145px;margin-top: 50px">采购员：</p><p style="margin-top: 50px;margin-left: -80px;float: left" th:text="${goods.purchaser}"></p>
                                                                            <p style="float: left;margin-left: -145px;margin-top: 75px">结算账户：</p><p style="margin-top: 75px;margin-left: -60px;float: left" th:text="${goods.settlementAccount}"></p>
                                                                            <p style="float: left;margin-left: -145px;margin-top: 100px">仓库：</p><p style="margin-top:100px;margin-left: -95px;float: left" th:text="${goods.stock}"></p>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                    </td>
                                                </tr>
                                                </tbody>
                                            </table>
                                        </section>
                                    </div>

                                    <!-- /.nav-tabs-custom -->
                                </div>

                                <!-- /.content -->
                            </div>
                        </div>

                    </div></section>
            </div>
        </div>
    </div>
    <footer class="main-footer">
        <div class="pull-right hidden-xs">
            <b>Version</b> 2.4.0
        </div>
        <strong>Copyright &copy; 2014-2016 <a href="https://adminlte.io">Almsaeed Studio</a>.</strong> All rights
        reserved.
    </footer>
</div>
</div>
<script src="../../wechat/js/jquery-2.1.4.js"></script>
<script src="../../wechat/js/fastclick.js"></script>
<script>
    $(function() {
        FastClick.attach(document.body);
    });
</script>
<script src="../../wechat/js/jquery-weui.js"></script>
<script src="../../bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- Select2 -->
<script src="../../bower_components/select2/dist/js/select2.full.min.js"></script>
<!-- InputMask -->
<script src="../../plugins/input-mask/jquery.inputmask.js"></script>
<script src="../../plugins/input-mask/jquery.inputmask.date.extensions.js"></script>
<script src="../../plugins/input-mask/jquery.inputmask.extensions.js"></script>
<!-- date-range-picker -->
<script src="../../bower_components/moment/min/moment.min.js"></script>
<script src="../../bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
<!-- bootstrap datepicker -->
<script src="../../bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
<!-- bootstrap color picker -->
<script src="../../bower_components/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js"></script>
<!-- bootstrap time picker -->
<script src="../../plugins/timepicker/bootstrap-timepicker.min.js"></script>
<!-- SlimScroll -->
<script src="../../bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<!-- iCheck 1.0.1 -->
<script src="../../plugins/iCheck/icheck.min.js"></script>
<!-- FastClick -->
<script src="../../bower_components/fastclick/lib/fastclick.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="../../dist/js/demo.js"></script>
<!-- DataTables -->
<script src="../../bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="../../bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<!-- FastClick -->
<script src="../../bower_components/fastclick/lib/fastclick.js"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
<!-- Page Script -->
<script src="https://unpkg.com/bootstrap-table@1.15.2/dist/bootstrap-table.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.15.2/dist/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
<script src="../../dist/js/datePicker.js"></script>
<script>
    function today() {
        var date = new Date();
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate();
        var day1 = date.getDate()+1;
        var startTime = year+"-"+month+"-"+day;;
        var endTime = year+"-"+month+"-"+day1;
        window.location.href = "/forms/purchase_mobile?startTime=" + startTime +"&endTime="+endTime;
    }
    function yesterday() {
        var date = new Date();
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate()-1;
        var day1 = date.getDate();
        var startTime = year+"-"+month+"-"+day;;
        var endTime = year+"-"+month+"-"+day1;
        window.location.href = "/forms/purchase_mobile?startTime=" + startTime +"&endTime="+endTime;
    }
    function seven() {
        //endTime
        var date = new Date();
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate()+1;
        //startTime
        var date1 = new Date(date - 1000 * 60 * 60 * 24 * 7);
        var year1 = date1.getFullYear();
        var month1 = date1.getMonth() + 1;
        var day1 = date1.getDate();
        var startTime = year1+"-"+month1+"-"+day1;;
        var endTime = year+"-"+month+"-"+day;
        window.location.href = "/forms/purchase_mobile?startTime=" + startTime +"&endTime="+endTime;
    }
    function thirty() {
        //endTime
        var date = new Date();
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var day = date.getDate()+1;
        //startTime
        var date1 = new Date(date - 1000 * 60 * 60 * 24 * 30)
        var year1 = date1.getFullYear();
        var month1 = date1.getMonth() + 1;
        var day1 = date1.getDate();
        var startTime = year1+"-"+month1+"-"+day1;;
        var endTime = year+"-"+month+"-"+day;
        window.location.href = "/forms/purchase_mobile?startTime=" + startTime +"&endTime="+endTime;
    }
</script>
</body>
</html>
